<!DOCTYPE html>
<html>
<head>
    <title>轮播</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("sys:indexbanner:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:indexbanner:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:indexbanner:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">图片链接</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="indexbanner.imgurl" placeholder="图片链接"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="form-group" id="t1">
                        <div class="col-sm-2 control-label">图片链接</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control"  id="imgurl" placeholder="课程图片"
                                   readonly="readonly"/>
                            <button type="button" class="layui-btn  layui-btn-sm" id="xzImgurl">
                                选择图片
                            </button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="isImgurl">
                                上传
                            </button>
                            <div id="xsImgurl"></div>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">跳转链接或页面</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="indexbanner.hrefurl" placeholder="跳转链接或页面"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">跳转类型 0 链接 1 页面</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="indexbanner.type" placeholder="跳转类型 0 链接 1 页面"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">类型</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="indexbanner.type" @keyup.enter="query" >
                                <option value="0">链接</option>
                                <option value="1">页面</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="indexbanner.statu" @keyup.enter="query" >
                                <option value="0">启用</option>
                                <option value="1">禁用</option>
                            </select>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/indexbanner.js?_${.now?long}"></script>
<script>
    var startDate= laydate.render({
        elem: '#createtime'//指定元素
        ,type: 'datetime'
    });
</script>
</body>
</html>